<%@ include file="/common/taglibs.jsp"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="catalog" tagdir="/WEB-INF/tags/catalog"%>

<head>
	<title><fmt:message key="customer.register.title"/></title>
</head>

<div class="register">
	<div class="top"><fmt:message key="customerRegister.title"/></div>
	<div class="content">
		<div class="ok">
		<c:choose>
			<c:when test="${activeMode==1}">
				<h4>
					<fmt:message key="customerRegister.result.waitEmailActive1">
						<fmt:param>${email}</fmt:param>
					</fmt:message>
				</h4>
				<fmt:message key="customerRegister.result.waitEmailActive2">
					<fmt:param>sendActiveEmailAgain('${email}')</fmt:param>
				</fmt:message>
				<ins></ins>
			</c:when>
			<c:when test="${activeMode==2}">
				<h4><fmt:message key="customerRegister.result.waitAdminActive1"/></h4>
				<fmt:message key="customerRegister.result.waitAdminActive2">
					<fmt:param>${email}</fmt:param>
				</fmt:message>	
				<br/>
				<fmt:message key="customerRegister.result.waitAdminActive3">
					<fmt:param>${ctxPath}/index.html</fmt:param>
				</fmt:message>
				<ins></ins>
				
			</c:when>
			<c:otherwise>
				<%-- 立即激活方式 --%>
				<h4><fmt:message key="customerRegister.result.success1"/></h4>
				<fmt:message key="customerRegister.result.success2"/>
				<br/>
				<fmt:message key="customerRegister.result.success3">
					<fmt:param>${ctxPath}/index.html</fmt:param>
					<fmt:param>${ctxPath}/customer/csEditProfile.html</fmt:param>
				</fmt:message>
				<ins></ins>
			</c:otherwise>
		</c:choose>
		</div>	
	</div>
</div>		
<script type="text/javascript">

$j(document).ready(function () {
	__FMTExtend = {
		 customerRegister_mail_send_success:"<fmt:message key="customerRegister.mail.send.success"/>"
	};
	$j.extend(__FMT, __FMTExtend); 
});

//再次发送激活邮件
function sendActiveEmailAgain(email){
	var postData = {'email':email};
	$j.post(__ctxPath+'/customer/register/blank.html?doAction=sendActiveEmailAgain',postData,sendActiveEmailAgainCallback,"json");
}
//再次发送激活邮件 callback
function sendActiveEmailAgainCallback(){
	alert(__FMT.customerRegister_mail_send_success);
}
</script>
